Skip to content

switch to internal project structure#289

Merged
kindermax merged 1 commit intomasterfrom
switch-to-internal-project-structure
Mar 4, 2026
Merged

switch to internal project structure#289
kindermax merged 1 commit intomasterfrom
switch-to-internal-project-structure

Conversation

@kindermax
Copy link
Collaborator

@kindermax kindermax commented Mar 4, 2026

Summary by Sourcery

Move internal packages under an internal module structure and update imports across the codebase to use the new paths.

Enhancements:

  • Restructure project layout so core packages (cmd, config, executor, checksum, env, logging, lsp, set, upgrade, util, workdir, test, etc.) live under the Go internal directory to clearly mark them as non-public APIs.
  • Update all application and test imports to reference the new internal/... package paths.

@sourcery-ai
Copy link

sourcery-ai bot commented Mar 4, 2026

Reviewer's Guide

Reorganizes the Go module to use an internal project structure by moving most packages under internal/ and updating all corresponding import paths, without changing runtime behavior.

File-Level Changes

Change Details Files
Adopt internal module structure and update imports in main entrypoint and commands
  • Changed top-level package imports in main.go to reference internal subpackages instead of public ones
  • Updated cmd package files (root, subcommand, completion, lsp) to import config, executor, docopt, set via the new internal paths
  • Adjusted tests in cmd to reference the new internal config package
main.go
internal/cmd/root.go
internal/cmd/root_test.go
internal/cmd/subcommand.go
internal/cmd/completion.go
internal/cmd/lsp.go
Move configuration-related code under internal/config and fix all references
  • Relocated config implementation files (load, validate, find, version, mixin, command, env) into internal/config and internal/config/config directories
  • Moved path helper into internal/config/path and updated util imports
  • Adjusted all imports to use github.com/lets-cli/lets/internal/config/... including in main, executor, cmd, and tests
internal/config/load.go
internal/config/validate.go
internal/config/find.go
internal/config/validate_test.go
internal/config/config/config.go
internal/config/config/mixin.go
internal/config/config/command.go
internal/config/config/env.go
internal/config/config/version.go
internal/config/path/path.go
Move executor and environment helpers under internal and update call sites
  • Moved executor package to internal/executor and updated imports from cmd and other internal packages
  • Relocated env-related helpers used by executor and wired them via internal/checksum
internal/executor/executor.go
internal/executor/env.go
internal/cmd/subcommand.go
Move checksum, set, util, test, and LSP helper packages under internal and update imports
  • Relocated checksum implementation and tests under internal/checksum and fixed imports from config, executor, and tests
  • Updated LSP handlers to consume util via internal/util
  • Adjusted checksum-related references in config files to use the internal path
  • Pointed tests to internal/test package instead of the public test package
internal/checksum/checksum.go
internal/checksum/checksum_test.go
internal/lsp/handlers.go
internal/config/config/checksum.go
Move upgrade logic and registry under internal and rewire imports
  • Moved upgrade implementation into internal/upgrade and its registry into internal/upgrade/registry
  • Updated main and tests to import upgrade and registry from the new internal location
internal/upgrade/upgrade.go
internal/upgrade/upgrade_test.go
internal/upgrade/registry
main.go

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@kindermax kindermax merged commit d6c8092 into master Mar 4, 2026
5 checks passed
@kindermax kindermax deleted the switch-to-internal-project-structure branch March 4, 2026 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant